/*
 * PrintBO.java
 *
 * Created on April 1, 2007, 11:35 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package Data;

/**
 * Business object for Print Orders
 * @author Grant Gordon
 */
public class PrintBO extends RevenueSourceBO {
    
    private boolean dirty = false;
    private boolean alreadyInDB = false;
    private String id = "";
    private String paperType = "";
    private String size = "";
    private double copies = 0;
    private double unitPrice = 0;
    private double totalPrice = 0;
    private String externalID = "";
    private String description = "";
    private String completed = "N";
    private String notificationSent = "N";
    private int numPhotos = 0;
    private double price = 0.0;
    
    /** Creates a new instance of PrintBO */
    public PrintBO(String GUID) {
        id = GUID;
    }

    /**
     * Returns whether the object has changed or not
     * @return dirty or not
     */
    public boolean isDirty() {
        return dirty;
    }

    /**
     * Flags the object as changed or not
     * @param dirty flag: changed or not (true false)
     */
    public void setDirty(boolean dirty) {
        this.dirty = dirty;
    }

    /**
     * Asks the method if it has been changed
     * @return dirty or not
     */
    public boolean isAlreadyInDB() {
        return alreadyInDB;
    }

    /**
     * Flags the object as already in DB or not
     * @param alreadyInDB flag for in the db or not
     */
    public void setAlreadyInDB(boolean alreadyInDB) {
        this.dirty = true;
        this.alreadyInDB = alreadyInDB;
    }

    /**
     * Returns this print job's paper type
     * @return Paper type
     */
    public String getPaperType() {
        return paperType;
    }

    /**
     * Sets this print order's paper type
     * @param paperType Paper type
     */
    public void setPaperType(String paperType) {
        this.dirty = true;
        this.paperType = paperType;
    }

    /**
     * Returns the print size (i.e. 4x6) for this order
     * @return Print size 
     */
    public String getSize() {
        return size;
    }

    /**
     * Set's the size for this print order
     * @param size Size of photo prints
     */
    public void setSize(String size) {
        this.dirty = true;
        this.size = size;
    }

    /**
     * Returns number of copies (i.e. doubles = 2)
     * @return Number of copies
     */
    public double getCopies() {
        return copies;
    }

    /**
     * Set's the number of copies for this print order (i.e. doubles = 2)
     * @param copies Number of copies
     */
    public void setCopies(double copies) {
        this.dirty = true;
        this.copies = copies;
    }

    /**
     * Return price/print
     * @return price/print
     */
    public double getUnitPrice() {
        return unitPrice;
    }

    /**
     * Sets price/unit
     * @param unitPrice price/unit
     */
    public void setUnitPrice(double unitPrice) {
        this.dirty = true;
        this.unitPrice = unitPrice;
    }

    /**
     * Return total price
     * @return total price for print order
     */
    public double getTotalPrice() {
        return totalPrice;
    }

    /**
     * Set's total price for print order
     * @param totalPrice Total price for print order
     */
    public void setTotalPrice(double totalPrice) {
        this.dirty = true;
        this.totalPrice = totalPrice;
    }

    /**
     * Returns print order External ID
     * @return External ID
     */
    public String getExternalID() {
        return externalID;
    }

    /**
     * Set's external ID
     * @param externalID External ID
     */
    public void setExternalID(String externalID) {
        this.dirty = true;
        this.externalID = externalID;
    }

    /**
     * Returns description and special instructions for print order
     * @return Description and special instructions
     */
    public String getDescription() {
        return description;
    }

    /**
     * Sets description / special instructions
     * @param description description / special instructions
     */
    public void setDescription(String description) {
        this.dirty = true;
        this.description = description;
    }

    /**
     * Returns the object id
     * @return id
     */
    public String getId() {
        return id;
    }

    /**
     * Set's the object's id
     * @param id id
     */
    public void setId(String id) {
        this.dirty = true;
        this.id = id;
    }

    /**
     * Asks the Print order if it's completed or not
     * @return complete?
     */
    public String getCompleted() {
        return completed;
    }

    /**
     * Set's the Print order's status
     * @param completed ?
     */
    public void setCompleted(String completed) {
        this.dirty = true;
        this.completed = completed;
    }
    
    /**
     * Asks the Print order if there has been a notification
     * @return Notification sent Y/N
     */
    public String getNotificationSent() {
        return notificationSent;
    }
    
    /**
     * Set's the notification flag
     * @param notificationSent Y/N
     */
    public void setNotificationSent(String notificationSent) {
        this.dirty = true;
        this.notificationSent = notificationSent;
    }

    /**
     * Asks the Print order if there has been a notification
     * @return Notification sent Y/N
     */
    public int getNumPhotos() {
        return numPhotos;
    }
 
    /**
     * Set's the notification flag
     * @param numPhotos Y/N
     */
    public void setNumPhotos(int numPhotos) {
        this.dirty = true;
        this.numPhotos = numPhotos;
    }
    


    public void calculatePrice() {
        double price = 0.0;//put code for calculating the price here;
        super.setPrice(price);
    }
    
}
